package com.toocms.jinjuhang.ui.login.register

import com.toocms.jinjuhang.BR
import com.toocms.jinjuhang.R
import com.toocms.jinjuhang.databinding.FgtRegisterBinding
import com.toocms.jinjuhang.ui.base.BaseFgt
import com.toocms.jinjuhang.ui.login.LoginFgt
import com.toocms.jinjuhang.utils.FragmentUtils
import com.toocms.tab.TooCMSApplication

class RegisterFgt : BaseFgt<FgtRegisterBinding, RegisterModel>() {
    override fun onFragmentCreated() {
        topBar.apply {
            setTitle(R.string.str_register)
            addRightTextButton(R.string.str_login, R.id.menu_login)
                .setOnClickListener {
                    FragmentUtils.popTo(LoginFgt::class.java, false)
                }
        }
    }

    override fun getLayoutResId() = R.layout.fgt_register

    override fun getVariableId() = BR.registerModel

    override fun viewObserver() {

    }

    override fun getViewModel()=RegisterModel(TooCMSApplication.getInstance(),arguments)
}